import request from '@/utils/request'

export function getFirmListApi(params) {
  return request({
    url: '/park/enterprise',
    params
  })
}

// 获取行业
export function getLineApi() {
  return request({
    url: '/park/industry'
  })
}

// 上传
export function uploadApi(data) {
  return request({
    url: '/upload',
    method: 'POST',
    data
  })
}

// 添加企业
export function addFirmApi(data) {
  return request({
    url: '/park/enterprise',
    method: 'post',
    data
  })
}

// 企业详细信息
export function getFirmDetailApi(id) {
  return request({
    url: `/park/enterprise/${id}`
  })
}

// 下载
export function downLoadApi(id) {
  return request({
    url: `/park/enterprise/${id}`
  })
}

// 修改企业信息
export function alertFirmApi(data) {
  return request({
    url: `/park/enterprise`,
    method: 'put',
    data
  })
}
// 删除企业
export function delFirmApi(id) {
  return request({
    url: `/park/enterprise/${id}`,
    method: 'delete'
  })
}
/**
 * 获取空置中楼宇列表（未租赁）
 * @param {*}
 * @returns
 */
export function getRentBuildListApi() {
  return request({
    url: '/park/rent/building'
  })
}

// 添加合同
export function addcontractApi(data) {
  return request({
    url: '/park/enterprise/rent',
    method: 'post',
    data
  })
}
